package Junit;

import Domain.Employee;
import Service.NameListService;
import Service.TeamException;
import org.junit.Test;

import java.util.ArrayList;

/**
 * ClassName:NameListServiceTest
 * Package:Junit
 * Description
 *
 * @Author:@wenxueshi
 * @Create:2022/11/30 - 19:46
 * @Version:v1.0
 */
public class NameListServiceTest {
    @Test
    public void testGetAllEmpl()
    {
        NameListService service = new NameListService();
        ArrayList allempl = service.getAllempl();
        allempl.forEach(System.out :: println);
    }
    @Test
    public void testGetIndexEmpl() {
        int id = 1;
        NameListService service = new NameListService();
        Employee indexEmpl = null;
        try {
            indexEmpl = service.getIndexEmpl(id);
            System.out.println(indexEmpl);
        } catch (TeamException e) {
            throw new RuntimeException(e);
        }
    }
}
